<template>
    <div class="home-container">
        <div v-for="item in routes" :key="item.path" @click="goPath(item.path)">
            {{ item.meta.title || (item.meta.i18nTitle && $t(item.meta.i18nTitle)) || ''}}
        </div>
    </div>
</template>

<script>
import { defineComponent } from 'vue'
import { useRouter } from 'vue-router'
import { routes } from '@/router/index'
export default defineComponent({
  setup () {
    const router = useRouter()
    const goPath = (path) => {
      router.push(path)
    }
    return {
      routes,
      goPath
    }
  }
})
</script>

<style lang="less" scoped>
  .home-container {
    >div {
        height: 50px;
        line-height: 50px;
        text-align: center;
        border-bottom: 1px solid #f1f1f1;
        font-size: 14px;
    }
  }
</style>
